package com.rd.student.jiaji.class4.suyan.zrrd.day07;

public class Teacher {
    //成员变量
    private String name;
    private int age;
    //构造方法
    public Teacher(){

    }
    //根据需求，写有参构造方法
    public Teacher(String name){
        this.name=name;
    }
    public Teacher(int age){
        this.age=age;
    }
    public Teacher(String name,int age){
        this.name=name;
        this.age=age;
    }
    //构造成员
    public void setName(String name){
        this.name=name;
    }
    public void setAge(int age){
        this.age=age;
    }
    public String getName(){
        return name;
    }
    public int getAge(){
        return age;

    }}
